﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class 增加补货表 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "T_ShippingReplenishment",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    OrderId = table.Column<long>(type: "bigint", nullable: true),
                    OrderDetailId = table.Column<long>(type: "bigint", nullable: true),
                    BillType = table.Column<int>(type: "int", nullable: true),
                    OrdeSn = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    MaterialId = table.Column<long>(type: "bigint", nullable: true),
                    MaterialName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromWhId = table.Column<long>(type: "bigint", nullable: true),
                    FromWhName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromWhCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromAreaId = table.Column<long>(type: "bigint", nullable: true),
                    FromAreaName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromAreaCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromInventoryId = table.Column<long>(type: "bigint", nullable: true),
                    FromCellId = table.Column<long>(type: "bigint", nullable: true),
                    FromCellCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromCellName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromCellDepthIndex = table.Column<int>(type: "int", nullable: true),
                    FromPalletBarcode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToWhId = table.Column<long>(type: "bigint", nullable: true),
                    ToWhName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToWhCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToAreaId = table.Column<long>(type: "bigint", nullable: true),
                    ToAreaName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToAreaCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToInventoryId = table.Column<long>(type: "bigint", nullable: true),
                    ToCellId = table.Column<long>(type: "bigint", nullable: true),
                    ToCellCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToCellName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToCellDepthIndex = table.Column<int>(type: "int", nullable: true),
                    ToPalletBarcode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    Status = table.Column<int>(type: "int", nullable: true),
                    AddQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    SubtractQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    CreateUserId = table.Column<long>(type: "bigint", nullable: false),
                    CreateUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ModifyUserId = table.Column<long>(type: "bigint", nullable: false),
                    ModifyUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    ModifyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_T_ShippingReplenishment", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "T_ShippingReplenishment");
        }
    }
}
